package service

import (
	"context"

	pb "manage/api/exam"
	"manage/app/exam/internal/biz"
)

type ExamServiceService struct {
	pb.UnimplementedExamServiceServer

	bz *biz.ExamUsecase
}

func NewExamServiceService(bz *biz.ExamUsecase) *ExamServiceService {
	return &ExamServiceService{
		bz: bz,
	}
}

func (s *ExamServiceService) CreateExam(ctx context.Context, req *pb.CreateExamRequest) (*pb.CreateExamResponse, error) {
	return s.bz.Create(ctx, req)
}
func (s *ExamServiceService) DeleteExam(ctx context.Context, req *pb.DeleteExamRequest) (*pb.DeleteExamResponse, error) {
	return s.bz.Delete(ctx, req)
}
func (s *ExamServiceService) UpdateExam(ctx context.Context, req *pb.UpdateExamRequest) (*pb.UpdateExamResponse, error) {
	return s.bz.Update(ctx, req)
}
func (s *ExamServiceService) GetExam(ctx context.Context, req *pb.GetExamRequest) (*pb.GetExamResponse, error) {
	return s.bz.Get(ctx, req)
}
